/*
package com.tykboot.controller;

import com.tykboot.core.base.BaseController;
import com.tykboot.entity.Test;
import com.tykboot.message.ResponseMsg;
import com.tykboot.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

*/
/**
 * @author LiuYu
 * @date 2018/12/3
 *//*

@Api(value = "/api/test", tags = "测试接口模块", description = "测试")
@RestController
@RequestMapping("/api/test")
public class SwaggerController extends BaseController {

    @Autowired
    private TestService testService;

    @ApiOperation(value = "添加", notes = "添加")
    @ApiImplicitParam(paramType = "body", dataType = "Test", name = "model", value = "实体", required = true)
    @PostMapping("/add")
    public ResponseMsg add(@RequestBody Test requestBody) {
        ResponseMsg responseMsg = new ResponseMsg();
        responseMsg.setData(testService.save(requestBody));
        return responseMsg;
    }

    @ApiOperation(value = "删除", notes = "删除")
    @DeleteMapping("/deleteById/{id}")
    public ResponseMsg delete(@PathVariable Integer id) {
        testService.deleteById(id);
        return new ResponseMsg();
    }

    @ApiOperation(value = "查询全部", notes = "查询全部")
    @GetMapping("/queryAll")
    public ResponseMsg queryAll() {
        ResponseMsg responseMsg = new ResponseMsg();
        responseMsg.setData(testService.findAll());
        return responseMsg;
    }

    @ApiOperation(value = "查询单个", notes = "查询单个")
    @GetMapping("/queryById/{id}")
    public ResponseMsg queryById(@PathVariable("id") Integer id) {
        ResponseMsg responseMsg = new ResponseMsg();
        responseMsg.setData(testService.findById(id));
        return responseMsg;
    }

    @ApiOperation(value = "修改", notes = "修改")
    @ApiImplicitParam(paramType = "body", dataType = "Test", name = "model", value = "实体", required = true)
    @PutMapping("/edit")
    public ResponseMsg edit(@RequestBody Test requestBody) {
        testService.save(requestBody);
        return new ResponseMsg();
    }
}
*/
